from user import User
us = User()
#from util import *
from account import Busines
bs = Busines()

class Menu():
    def start_menu():
        tips = '''
        *******************欢迎使用WoniuATM*******************
            ****************请选择操作菜单****************
        **************** 1. 注册 2.登录 3.退卡****************
               '''
        print(tips)
        choose = input('请输入你的选择项')
        if choose == '1':
            us.zhuce()
        elif choose == '2':
            us.denglu()
        elif choose == '3':
            exit(谢谢使用,欢迎下次使用)
        else:
            start_menu()

    def main_menu():
        tips = '''
                *********************欢迎登录蜗牛银行*********************
                        ****************请选择操作菜单****************
                *****1.查询 2.取款 3.存款 4.转账 5.流水 6.返回 7.退卡*****
                '''
        print(tips)
        choose = input('请输入你的选择')
        if choose == '1':
            bs.query()
        elif choose == '2':
            bs.withdraw()
        elif choose == '3':
            bs.deposit()
        elif choose == '4':
            bs.transfer()
        elif choose == '5':
            pass
        elif choose == '6':
            pass
        elif choose == '7':
            exit(谢谢使用,欢迎下次使用)
        else:
            main_menu()


if __name__ == "__main__":
    menu = MENU()
    menu.start_menu()